package keter.framework.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import keter.framework.model.SecurityEvent;

/**
 *  安全事件记录器
 *
 * @author  gulixing@msn.com
 * @date    2015年11月21日
 */
public class SecurityUtil {
	
	/**
	* Logger for this class
	*/
	private static final Logger logger = LoggerFactory.getLogger(SecurityUtil.class);
	
	public static enum EVENT_TYPE{
		AUTHENTICATION,
		CSRF
	}
	
	public static void log(String msg,EVENT_TYPE evt){
		SecurityEvent se = new SecurityEvent();
		se.set("type", evt);
		se.set("content", msg);
		se.save();
	}

}
